package top.api.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.api.domain.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.api.domain.vo.ArticleListVo;

import java.util.List;

/**
* @author 27465
* @description 针对表【sg_article(文章表)】的数据库操作Mapper
* @createDate 2023-01-28 19:35:57
* @Entity top.api.domain.entity.Article
*/
@Repository
public interface ArticleMapper extends BaseMapper<Article> {

    /**
     * 分页查询文章
     * @param pageInfo
     * @param categoryId
     * @return
     */
    // 要求：根据category_id查询出分类列表名称 且 分页
    List<ArticleListVo> articleListPage(Page<ArticleListVo> pageInfo, @Param("categoryId") Long categoryId);
}




